//
//  QYXTopRankingModel.m
//  OpenYourEyes
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Google AdWords. All rights reserved.
//

#import "QYXTopRankingModel.h"

@implementation QYXTopRankingModel



- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.content = value;
    }
 
}



- (instancetype)initWithDic:(NSDictionary *)dic{
    
    self = [super initWithDic:dic];
    if (self) {
        
        NSMutableDictionary *coverDic = [[NSMutableDictionary alloc] initWithDictionary:_cover];
    
        self.coverModel = [[QYXCoverModel alloc] initWithDic:coverDic];
        NSMutableDictionary *userDic = [[NSMutableDictionary alloc] initWithDictionary:_user];
        
        self.commentModel = [[QYXCommentModel alloc] initWithDic:userDic];

        
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dict in self.playInfo) {
            QYXTopRankingPlayInfoModel *playInfModel = [[QYXTopRankingPlayInfoModel alloc] initWithDic:dict];
            [array addObject:playInfModel];
            
        }
        
        self.playInfo = [NSMutableArray arrayWithArray:array];
        
  
        

    }
    return self;
    
}



@end
